//导航栏
$(document).ready(function() {  
	$("#div1Link").click(function() {  
		$("html, body").animate({  
			scrollTop: $(".section_one").offset().top }, {duration: 500,easing: "swing"});  
		return false;  
	});  
	$("#div2Link").click(function() {  
		$("html, body").animate({  
			scrollTop: $(".section_two").offset().top }, {duration: 500,easing: "swing"});  
		return false;  
	});  
	$("#div3Link").click(function() {  
		$("html, body").animate({  
			scrollTop: $(".section_three").offset().top }, {duration: 500,easing: "swing"});  
		return false;  
	});  
});  

//自适应
$(document).ready(function(){
	$(window).resize(function() {
		sec_resize();
	});
});

function sec_resize(){
	//section_one
	x1=$(".section_one").width();
	$(".section_one").height(x1*0.7);

	//section_two
	x2=$(".section_two").width();
	$(".section_two").height(x2*0.64);
	
	//section_three
	x3=$(".section_three").width();
	$(".section_three").height(x3*0.85);

	//various height
	h1=$(".section_one").height();
	h2=$(".section_two").height();
	h3=$(".section_three").height();
	h4=$(".navbar2").height();

	$(".section_one .p1").css({'width':x1*0.4,'marginTop':x1*0.37,'marginLeft':x1*0.16,'font-size':x1*0.02});
	$(".section_one .picture_wrapper1").css({'width':x1*0.7,'height':x1*0.3,'marginTop':x1*0.02,'marginLeft':x1*0.1});
	$(".picture_wrapper1 a").css({'width':x1*0.7*0.4});
	$(".picture_wrapper1 a .picture_one").css({'height':x1*0.7*0.4*0.8});
	$(".picture_wrapper1 a .picture_two").css({'height':x1*0.7*0.4*0.8,'marginLeft':x1*0.7*0.4*0.02});

	$(".section_two .p2").css({'width':x2*0.35,'marginTop':x2*0.25,'marginRight':x2*0.17,'font-size':x2*0.02});
	$(".section_two .picture_wrapper2").css({'width':x2*0.7,'height':x2*0.3,'marginTop':x2*0.02,'marginLeft':x2*0.1});
	$(".picture_wrapper2 a").css({'width':x2*0.7*0.4});
	$(".picture_wrapper2 a .picture_one").css({'height':x2*0.7*0.4*0.8});
	$(".picture_wrapper2 a .picture_two").css({'height':x2*0.7*0.4*0.8,'marginLeft':x2*0.7*0.4*0.02});

	$(".section_three .p3").css({'width':x3*0.5,'marginTop':x3*0.2,'marginRight':x3*0.17,'font-size':x3*0.02});
	$(".section_three .picture_wrapper3").css({'width':x3,'height':x3*0.4});
	$(".picture_wrapper3 a").css({'width':x3*0.7*0.33});
	$(".picture_wrapper3 a .picture_one").css({'height':x3*0.7*0.47});
	$(".picture_wrapper3 a .picture_two").css({'height':x3*0.7*0.47,'marginLeft':x3*0.7*0.4*0.005});
	$(".picture_wrapper3 a .picture_three").css({'height':x3*0.7*0.5,'marginLeft':x3*0.7*0.4*0.005});
	$(".picture_wrapper3 a .picture_four").css({'height':x3*0.7*0.56,'marginLeft':x3*0.7*0.4*0.005});

	//wrapper
	$(".wrapper").height((h1+h2+h3+h4)*1.05);

}